/*********************************************************************************
 *      Copyright:  (C) 2025 LingYun IoT System Studio
 *                  All rights reserved.
 *
 *       Filename:  usage_client.c
 *    Description:  This file 
 *                 
 *        Version:  1.0.0(28/03/25)
 *         Author:  Guo Wenxue <guowenxue@gmail.com>
 *      ChangeLog:  1, Release initial version on "28/03/25 20:33:28"
 *                 
 ********************************************************************************/

#ifndef _USAGE_CLIENT_H_
#define _USAGE_CLIENT_H_

#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <netdb.h>

#include "logger.h"
#include "struct.h"

/*IP port 初始化*/
int socket_init(socket_cli *sock, char *host, int port);

/*关闭socket */
int socket_term(socket_cli *sock);

/*socket连接*/
int socket_connect(socket_cli *sock);

/*检测连接状态 */
int socket_check(socket_cli *sock);

#endif
